<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: jetson-utils/videoOutput.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('videoOutput_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">videoOutput.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="videoOutput_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * copy of this software and associated documentation files (the &quot;Software&quot;),</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * to deal in the Software without restriction, including without limitation</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __VIDEO_OUTPUT_H_</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __VIDEO_OUTPUT_H_</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="videoOptions_8h.html">videoOptions.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="imageFormat_8h.html">imageFormat.h</a>&quot;</span>                </div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="commandLine_8h.html">commandLine.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="group__video.html#ga408346b18d1f4c711279010d2351f7ce">   38</a></span>&#160;<span class="preprocessor">#define VIDEO_OUTPUT_USAGE_STRING  &quot;videoOutput arguments: \n&quot;                                                  \</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">                  &quot;    output_URI           resource URI of the output stream, for example:\n&quot;          \</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">                  &quot;                             * file://my_image.jpg    (image file)\n&quot;                        \</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">                  &quot;                             * file://my_video.mp4    (video file)\n&quot;                        \</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">                  &quot;                             * file://my_directory/   (directory of images)\n&quot;       \</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">                  &quot;                             * rtp://&lt;remote-ip&gt;:1234 (RTP stream)\n&quot;                        \</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">                  &quot;                             * display://0            (OpenGL window)\n&quot;             \</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">                  &quot;  --output-codec=CODEC   desired codec for compressed output streams:\n&quot;             \</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">                  &quot;                            * h264 (default), h265\n&quot;                                                \</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">                  &quot;                            * vp8, vp9\n&quot;                                                                    \</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">                  &quot;                            * mpeg2, mpeg4\n&quot;                                                                \</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">                  &quot;                            * mjpeg\n&quot;                                                                       \</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">                  &quot;  --bitrate=BITRATE      desired target VBR bitrate for compressed streams,\n&quot;    \</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">                  &quot;                         in bits per second. The default is 4000000 (4 Mbps)\n&quot;      \</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">                  &quot;  --headless             don&#39;t create a default OpenGL GUI window\n\n&quot;</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classvideoOutput.html">   86</a></span>&#160;<span class="keyword">class </span><a class="code" href="classvideoOutput.html">videoOutput</a></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;{</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">Create</a>( <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; options );</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structURI.html">URI</a>, <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; options=<a class="code" href="structvideoOptions.html">videoOptions</a>() );</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* URI, <span class="keyword">const</span> <a class="code" href="classcommandLine.html">commandLine</a>&amp; cmdLine );</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        </div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* URI, <span class="keyword">const</span> <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv );</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">Create</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv, <span class="keywordtype">int</span> positionArg=-1 );</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">Create</a>( <span class="keyword">const</span> <a class="code" href="classcommandLine.html">commandLine</a>&amp; cmdLine, <span class="keywordtype">int</span> positionArg=-1 );</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        </div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#a0122813d68dd88f0e1d1d92fbbc7edd1">CreateNullOutput</a>();</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        </div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classvideoOutput.html#a2186412156484860e31d827c10becf96">~videoOutput</a>();</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a4ffc51285e0dc05addf926b5f4598b88">  149</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classvideoOutput.html#a4ffc51285e0dc05addf926b5f4598b88">Usage</a>()               { <span class="keywordflow">return</span> <a class="code" href="group__video.html#ga408346b18d1f4c711279010d2351f7ce">VIDEO_OUTPUT_USAGE_STRING</a>; }</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        </div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classvideoOutput.html#ac63d627d52174400c01c28bb0de82993">  168</a></span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keywordtype">bool</span> <a class="code" href="classvideoOutput.html#ac63d627d52174400c01c28bb0de82993">Render</a>( T* image, uint32_t width, uint32_t height )           { <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#ac63d627d52174400c01c28bb0de82993">Render</a>((<span class="keywordtype">void</span>**)image, width, height, imageFormatFromType&lt;T&gt;()); }</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        </div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoOutput.html#ac63d627d52174400c01c28bb0de82993">Render</a>( <span class="keywordtype">void</span>* image, uint32_t width, uint32_t height, <a class="code" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a> format );</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoOutput.html#a58d163c8d3e54f336bf2dda4a759750e">Open</a>();</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classvideoOutput.html#a552252a397249335e77755e0b911225e">Close</a>();</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a2a3cf8d6230e26e27c5d22b29a150bdc">  211</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoOutput.html#a2a3cf8d6230e26e27c5d22b29a150bdc">IsStreaming</a>()<span class="keyword"> const                                         </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#a473772043b363d7c8dc00cddb70b0aa9">mStreaming</a>; }</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="classvideoOutput.html#afaba8521f7ff078293ee4052a28ee71c">  216</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoOutput.html#afaba8521f7ff078293ee4052a28ee71c">GetWidth</a>()<span class="keyword"> const                                                </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">mOptions</a>.<a class="code" href="structvideoOptions.html#a5c30587a874bb769d7b346ac00cff580">width</a>; }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="classvideoOutput.html#aa225fb199069cf2a4b30f467e237da73">  221</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoOutput.html#aa225fb199069cf2a4b30f467e237da73">GetHeight</a>()<span class="keyword"> const                                               </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">mOptions</a>.<a class="code" href="structvideoOptions.html#a66660b049937fd088b5ab29a0aa2187c">height</a>; }</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        </div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a26c37f79e965f1b9741b4d9b3923bd6b">  226</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">float</span> <a class="code" href="classvideoOutput.html#a26c37f79e965f1b9741b4d9b3923bd6b">GetFrameRate</a>()<span class="keyword"> const                                               </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">mOptions</a>.<a class="code" href="structvideoOptions.html#a85ceaa18c31e939f92da06027de8dedd">frameRate</a>; }</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        </div><div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a47edea2ad237e50cfbd6d0a192280ee5">  231</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> URI&amp; <a class="code" href="classvideoOutput.html#a47edea2ad237e50cfbd6d0a192280ee5">GetResource</a>()<span class="keyword"> const                                   </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">mOptions</a>.<a class="code" href="structvideoOptions.html#a1e904a117abb3b703f01eaed7fa305f2">resource</a>; }</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a59f21f27a0efe56541fbe15f1d5f46ce">  236</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; <a class="code" href="classvideoOutput.html#a59f21f27a0efe56541fbe15f1d5f46ce">GetOptions</a>()<span class="keyword"> const                   </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">mOptions</a>; }</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="classvideoOutput.html#ad2da4bab42fbd19a851e205647443ea5">  242</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classvideoOutput.html#ad2da4bab42fbd19a851e205647443ea5">AddOutput</a>( <a class="code" href="classvideoOutput.html">videoOutput</a>* output )                            { <span class="keywordflow">if</span>(output != NULL) <a class="code" href="classvideoOutput.html#a583b2977fc4b9e1747f1b9199bc583ea">mOutputs</a>.push_back(output); }</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="classvideoOutput.html#af4b749b5ed6728bfa818a1a1cafd2e19">  247</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoOutput.html#af4b749b5ed6728bfa818a1a1cafd2e19">GetNumOutputs</a>( <a class="code" href="classvideoOutput.html">videoOutput</a>* output )<span class="keyword"> const      </span>{ <a class="code" href="classvideoOutput.html#a583b2977fc4b9e1747f1b9199bc583ea">mOutputs</a>.size(); }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="classvideoOutput.html#aa1a64933421c48f1af63ea12a8217421">  252</a></span>&#160;        <span class="keyword">inline</span> <a class="code" href="classvideoOutput.html">videoOutput</a>* <a class="code" href="classvideoOutput.html#aa1a64933421c48f1af63ea12a8217421">GetOutput</a>( uint32_t index )<span class="keyword"> const           </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#a583b2977fc4b9e1747f1b9199bc583ea">mOutputs</a>[index]; }</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classvideoOutput.html#a7968711adc8814a9ec4e127e7b3a8bb2">SetStatus</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* str );</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classvideoOutput.html#aaedce68dfff9bd5c3e76c32468632512">  268</a></span>&#160;        <span class="keyword">virtual</span> <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoOutput.html#aaedce68dfff9bd5c3e76c32468632512">GetType</a>()<span class="keyword"> const                 </span>{ <span class="keywordflow">return</span> 0; }</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a0a3ed32e27da1e996dc21c0339dc5a95">  274</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoOutput.html#a0a3ed32e27da1e996dc21c0339dc5a95">IsType</a>( uint32_t type )<span class="keyword"> const               </span>{ <span class="keywordflow">return</span> (type == <a class="code" href="classvideoOutput.html#aaedce68dfff9bd5c3e76c32468632512">GetType</a>()); }</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="classvideoOutput.html#aa5463fc78e3d259fa18ea2e6349e21c8">  283</a></span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keywordtype">bool</span> <a class="code" href="classvideoOutput.html#aa5463fc78e3d259fa18ea2e6349e21c8">IsType</a>()<span class="keyword"> const                </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#aa5463fc78e3d259fa18ea2e6349e21c8">IsType</a>(T::Type); }</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a5a6c66bde88abdfa857bc9715acb8314">  288</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classvideoOutput.html#a5a6c66bde88abdfa857bc9715acb8314">TypeToStr</a>()<span class="keyword"> const                    </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoOutput.html#a5a6c66bde88abdfa857bc9715acb8314">TypeToStr</a>(<a class="code" href="classvideoOutput.html#aaedce68dfff9bd5c3e76c32468632512">GetType</a>()); }</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classvideoOutput.html#a5a6c66bde88abdfa857bc9715acb8314">TypeToStr</a>( uint32_t type );</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <a class="code" href="classvideoOutput.html#a02b39780efc6480ab424764dafe082ba">videoOutput</a>( <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; options );</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a473772043b363d7c8dc00cddb70b0aa9">  298</a></span>&#160;        <span class="keywordtype">bool</span>         <a class="code" href="classvideoOutput.html#a473772043b363d7c8dc00cddb70b0aa9">mStreaming</a>;</div><div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">  299</a></span>&#160;        <a class="code" href="structvideoOptions.html">videoOptions</a> <a class="code" href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">mOptions</a>;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="classvideoOutput.html#a583b2977fc4b9e1747f1b9199bc583ea">  301</a></span>&#160;        std::vector&lt;videoOutput*&gt; <a class="code" href="classvideoOutput.html#a583b2977fc4b9e1747f1b9199bc583ea">mOutputs</a>;</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;};</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classvideoOutput_html_a47edea2ad237e50cfbd6d0a192280ee5"><div class="ttname"><a href="classvideoOutput.html#a47edea2ad237e50cfbd6d0a192280ee5">videoOutput::GetResource</a></div><div class="ttdeci">const URI &amp; GetResource() const</div><div class="ttdoc">Return the resource URI of the stream. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:231</div></div>
<div class="ttc" id="classvideoOutput_html_a2186412156484860e31d827c10becf96"><div class="ttname"><a href="classvideoOutput.html#a2186412156484860e31d827c10becf96">videoOutput::~videoOutput</a></div><div class="ttdeci">virtual ~videoOutput()</div><div class="ttdoc">Destroy interface and release all resources. </div></div>
<div class="ttc" id="classvideoOutput_html_a26c37f79e965f1b9741b4d9b3923bd6b"><div class="ttname"><a href="classvideoOutput.html#a26c37f79e965f1b9741b4d9b3923bd6b">videoOutput::GetFrameRate</a></div><div class="ttdeci">float GetFrameRate() const</div><div class="ttdoc">Return the framerate, in Hz or FPS. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:226</div></div>
<div class="ttc" id="classvideoOutput_html_a0122813d68dd88f0e1d1d92fbbc7edd1"><div class="ttname"><a href="classvideoOutput.html#a0122813d68dd88f0e1d1d92fbbc7edd1">videoOutput::CreateNullOutput</a></div><div class="ttdeci">static videoOutput * CreateNullOutput()</div><div class="ttdoc">Create videoOutput interface that acts as a NULL output and does nothing with incoming frames...</div></div>
<div class="ttc" id="classvideoOutput_html_a02b39780efc6480ab424764dafe082ba"><div class="ttname"><a href="classvideoOutput.html#a02b39780efc6480ab424764dafe082ba">videoOutput::videoOutput</a></div><div class="ttdeci">videoOutput(const videoOptions &amp;options)</div></div>
<div class="ttc" id="classvideoOutput_html_aa2754b5d31e5466ad35db3f2832209f1"><div class="ttname"><a href="classvideoOutput.html#aa2754b5d31e5466ad35db3f2832209f1">videoOutput::Create</a></div><div class="ttdeci">static videoOutput * Create(const videoOptions &amp;options)</div><div class="ttdoc">Create videoOutput interface from a videoOptions struct that&amp;#39;s already been filled out...</div></div>
<div class="ttc" id="classvideoOutput_html_a2a3cf8d6230e26e27c5d22b29a150bdc"><div class="ttname"><a href="classvideoOutput.html#a2a3cf8d6230e26e27c5d22b29a150bdc">videoOutput::IsStreaming</a></div><div class="ttdeci">bool IsStreaming() const</div><div class="ttdoc">Check if the device is actively streaming or not. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:211</div></div>
<div class="ttc" id="classvideoOutput_html_aa5463fc78e3d259fa18ea2e6349e21c8"><div class="ttname"><a href="classvideoOutput.html#aa5463fc78e3d259fa18ea2e6349e21c8">videoOutput::IsType</a></div><div class="ttdeci">bool IsType() const</div><div class="ttdoc">Check if a this stream is of a particular type. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:283</div></div>
<div class="ttc" id="classvideoOutput_html_a59f21f27a0efe56541fbe15f1d5f46ce"><div class="ttname"><a href="classvideoOutput.html#a59f21f27a0efe56541fbe15f1d5f46ce">videoOutput::GetOptions</a></div><div class="ttdeci">const videoOptions &amp; GetOptions() const</div><div class="ttdoc">Return the videoOptions of the stream. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:236</div></div>
<div class="ttc" id="classvideoOutput_html_a5a6c66bde88abdfa857bc9715acb8314"><div class="ttname"><a href="classvideoOutput.html#a5a6c66bde88abdfa857bc9715acb8314">videoOutput::TypeToStr</a></div><div class="ttdeci">const char * TypeToStr() const</div><div class="ttdoc">Convert this stream&amp;#39;s class type to string. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:288</div></div>
<div class="ttc" id="structvideoOptions_html_a85ceaa18c31e939f92da06027de8dedd"><div class="ttname"><a href="structvideoOptions.html#a85ceaa18c31e939f92da06027de8dedd">videoOptions::frameRate</a></div><div class="ttdeci">float frameRate</div><div class="ttdoc">The framerate of the stream (the default is 30Hz). </div><div class="ttdef"><b>Definition:</b> videoOptions.h:70</div></div>
<div class="ttc" id="structURI_html"><div class="ttname"><a href="structURI.html">URI</a></div><div class="ttdoc">Resource URI of a video device, IP stream, or file/directory. </div><div class="ttdef"><b>Definition:</b> URI.h:91</div></div>
<div class="ttc" id="classvideoOutput_html"><div class="ttname"><a href="classvideoOutput.html">videoOutput</a></div><div class="ttdoc">The videoOutput API is for rendering and transmitting frames to video input devices such as display w...</div><div class="ttdef"><b>Definition:</b> videoOutput.h:86</div></div>
<div class="ttc" id="classvideoOutput_html_af4b749b5ed6728bfa818a1a1cafd2e19"><div class="ttname"><a href="classvideoOutput.html#af4b749b5ed6728bfa818a1a1cafd2e19">videoOutput::GetNumOutputs</a></div><div class="ttdeci">uint32_t GetNumOutputs(videoOutput *output) const</div><div class="ttdoc">Return the number of sub-streams. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:247</div></div>
<div class="ttc" id="classvideoOutput_html_aa1a64933421c48f1af63ea12a8217421"><div class="ttname"><a href="classvideoOutput.html#aa1a64933421c48f1af63ea12a8217421">videoOutput::GetOutput</a></div><div class="ttdeci">videoOutput * GetOutput(uint32_t index) const</div><div class="ttdoc">Return a sub-stream. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:252</div></div>
<div class="ttc" id="group__video_html_ga408346b18d1f4c711279010d2351f7ce"><div class="ttname"><a href="group__video.html#ga408346b18d1f4c711279010d2351f7ce">VIDEO_OUTPUT_USAGE_STRING</a></div><div class="ttdeci">#define VIDEO_OUTPUT_USAGE_STRING</div><div class="ttdoc">Standard command-line options able to be passed to videoOutput::Create() </div><div class="ttdef"><b>Definition:</b> videoOutput.h:38</div></div>
<div class="ttc" id="structvideoOptions_html_a66660b049937fd088b5ab29a0aa2187c"><div class="ttname"><a href="structvideoOptions.html#a66660b049937fd088b5ab29a0aa2187c">videoOptions::height</a></div><div class="ttdeci">uint32_t height</div><div class="ttdoc">The height of the stream (in pixels). </div><div class="ttdef"><b>Definition:</b> videoOptions.h:63</div></div>
<div class="ttc" id="structvideoOptions_html"><div class="ttname"><a href="structvideoOptions.html">videoOptions</a></div><div class="ttdoc">The videoOptions struct contains common settings that are used to configure and query videoSource and...</div><div class="ttdef"><b>Definition:</b> videoOptions.h:37</div></div>
<div class="ttc" id="commandLine_8h_html"><div class="ttname"><a href="commandLine_8h.html">commandLine.h</a></div></div>
<div class="ttc" id="videoOptions_8h_html"><div class="ttname"><a href="videoOptions_8h.html">videoOptions.h</a></div></div>
<div class="ttc" id="classvideoOutput_html_a4ffc51285e0dc05addf926b5f4598b88"><div class="ttname"><a href="classvideoOutput.html#a4ffc51285e0dc05addf926b5f4598b88">videoOutput::Usage</a></div><div class="ttdeci">static const char * Usage()</div><div class="ttdoc">Usage string for command line arguments to Create() </div><div class="ttdef"><b>Definition:</b> videoOutput.h:149</div></div>
<div class="ttc" id="classcommandLine_html"><div class="ttname"><a href="classcommandLine.html">commandLine</a></div><div class="ttdoc">Command line parser for extracting flags, values, and strings. </div><div class="ttdef"><b>Definition:</b> commandLine.h:35</div></div>
<div class="ttc" id="structvideoOptions_html_a5c30587a874bb769d7b346ac00cff580"><div class="ttname"><a href="structvideoOptions.html#a5c30587a874bb769d7b346ac00cff580">videoOptions::width</a></div><div class="ttdeci">uint32_t width</div><div class="ttdoc">The width of the stream (in pixels). </div><div class="ttdef"><b>Definition:</b> videoOptions.h:56</div></div>
<div class="ttc" id="classvideoOutput_html_af749bcbea4200ea33a1135f4f040879d"><div class="ttname"><a href="classvideoOutput.html#af749bcbea4200ea33a1135f4f040879d">videoOutput::mOptions</a></div><div class="ttdeci">videoOptions mOptions</div><div class="ttdef"><b>Definition:</b> videoOutput.h:299</div></div>
<div class="ttc" id="classvideoOutput_html_a0a3ed32e27da1e996dc21c0339dc5a95"><div class="ttname"><a href="classvideoOutput.html#a0a3ed32e27da1e996dc21c0339dc5a95">videoOutput::IsType</a></div><div class="ttdeci">bool IsType(uint32_t type) const</div><div class="ttdoc">Check if this stream is of a particular type. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:274</div></div>
<div class="ttc" id="classvideoOutput_html_a552252a397249335e77755e0b911225e"><div class="ttname"><a href="classvideoOutput.html#a552252a397249335e77755e0b911225e">videoOutput::Close</a></div><div class="ttdeci">virtual void Close()</div><div class="ttdoc">Stop streaming the device. </div></div>
<div class="ttc" id="classvideoOutput_html_a58d163c8d3e54f336bf2dda4a759750e"><div class="ttname"><a href="classvideoOutput.html#a58d163c8d3e54f336bf2dda4a759750e">videoOutput::Open</a></div><div class="ttdeci">virtual bool Open()</div><div class="ttdoc">Begin streaming the device. </div></div>
<div class="ttc" id="classvideoOutput_html_a583b2977fc4b9e1747f1b9199bc583ea"><div class="ttname"><a href="classvideoOutput.html#a583b2977fc4b9e1747f1b9199bc583ea">videoOutput::mOutputs</a></div><div class="ttdeci">std::vector&lt; videoOutput * &gt; mOutputs</div><div class="ttdef"><b>Definition:</b> videoOutput.h:301</div></div>
<div class="ttc" id="classvideoOutput_html_a473772043b363d7c8dc00cddb70b0aa9"><div class="ttname"><a href="classvideoOutput.html#a473772043b363d7c8dc00cddb70b0aa9">videoOutput::mStreaming</a></div><div class="ttdeci">bool mStreaming</div><div class="ttdef"><b>Definition:</b> videoOutput.h:298</div></div>
<div class="ttc" id="classvideoOutput_html_ad2da4bab42fbd19a851e205647443ea5"><div class="ttname"><a href="classvideoOutput.html#ad2da4bab42fbd19a851e205647443ea5">videoOutput::AddOutput</a></div><div class="ttdeci">void AddOutput(videoOutput *output)</div><div class="ttdoc">Add an output sub-stream. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:242</div></div>
<div class="ttc" id="classvideoOutput_html_a7968711adc8814a9ec4e127e7b3a8bb2"><div class="ttname"><a href="classvideoOutput.html#a7968711adc8814a9ec4e127e7b3a8bb2">videoOutput::SetStatus</a></div><div class="ttdeci">virtual void SetStatus(const char *str)</div><div class="ttdoc">Set a status string (i.e. </div></div>
<div class="ttc" id="classvideoOutput_html_aa225fb199069cf2a4b30f467e237da73"><div class="ttname"><a href="classvideoOutput.html#aa225fb199069cf2a4b30f467e237da73">videoOutput::GetHeight</a></div><div class="ttdeci">uint32_t GetHeight() const</div><div class="ttdoc">Return the height of the stream, in pixels. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:221</div></div>
<div class="ttc" id="classvideoOutput_html_ac63d627d52174400c01c28bb0de82993"><div class="ttname"><a href="classvideoOutput.html#ac63d627d52174400c01c28bb0de82993">videoOutput::Render</a></div><div class="ttdeci">bool Render(T *image, uint32_t width, uint32_t height)</div><div class="ttdoc">Render and output the next frame to the stream. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:168</div></div>
<div class="ttc" id="imageFormat_8h_html"><div class="ttname"><a href="imageFormat_8h.html">imageFormat.h</a></div></div>
<div class="ttc" id="structvideoOptions_html_a1e904a117abb3b703f01eaed7fa305f2"><div class="ttname"><a href="structvideoOptions.html#a1e904a117abb3b703f01eaed7fa305f2">videoOptions::resource</a></div><div class="ttdeci">URI resource</div><div class="ttdoc">The resource URI of the device, IP stream, or file/directory. </div><div class="ttdef"><b>Definition:</b> videoOptions.h:49</div></div>
<div class="ttc" id="classvideoOutput_html_afaba8521f7ff078293ee4052a28ee71c"><div class="ttname"><a href="classvideoOutput.html#afaba8521f7ff078293ee4052a28ee71c">videoOutput::GetWidth</a></div><div class="ttdeci">uint32_t GetWidth() const</div><div class="ttdoc">Return the width of the stream, in pixels. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:216</div></div>
<div class="ttc" id="group__imageFormat_html_ga931c48e08f361637d093355d64583406"><div class="ttname"><a href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a></div><div class="ttdeci">imageFormat</div><div class="ttdoc">The imageFormat enum is used to identify the pixel format and colorspace of an image. </div><div class="ttdef"><b>Definition:</b> imageFormat.h:49</div></div>
<div class="ttc" id="classvideoOutput_html_aaedce68dfff9bd5c3e76c32468632512"><div class="ttname"><a href="classvideoOutput.html#aaedce68dfff9bd5c3e76c32468632512">videoOutput::GetType</a></div><div class="ttdeci">virtual uint32_t GetType() const</div><div class="ttdoc">Return the interface type of the stream. </div><div class="ttdef"><b>Definition:</b> videoOutput.h:268</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_54a0acf6da04fe2ed9410b4c6369bc5d.html">jetson-utils</a></li><li class="navelem"><a class="el" href="videoOutput_8h.html">videoOutput.h</a></li>
    <li class="footer">Generated on Tue Jul 14 2020 21:59:34 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
